---
title: Face Liveness
description: Amplify UI FaceLivenessDetector provides a UI component for Amazon Rekognition Face Liveness that helps developers verify that only real users, not bad actors using spoofs, can access your services.
supportedFrameworks: react|android|swift
---
import { InlineFilter } from '@/components/InlineFilter';
import { getCustomStaticPath } from '@/utils/getCustomStaticPath';

import FullAndroid from './full-api.android.mdx';
import FullReact from './full-api.react.mdx';
import FullSwift from './full-api.swift.mdx';
import ReactPage from './intro.react.mdx';
import AndroidPage from './intro.android.mdx';
import SwiftPage from './intro.swift.mdx';
import PreReqAndroid from './prerequisite.android.mdx';
import PreReqReact from './prerequisite.react.mdx';
import PreReqSwift from './prerequisite.swift.mdx';
import QuickAndroid from './quick-start-pull.android.mdx';
import QuickReact from './quick-start-pull.react.mdx';
import QuickSwift from './quick-start-pull.swift.mdx';

export async function getStaticPaths() {
  return getCustomStaticPath(frontmatter.supportedFrameworks);
}

{/*  `getStaticProps` is required to prevent "Error: getStaticPaths was added without a getStaticProps. Without getStaticProps, getStaticPaths does nothing" */}

export async function getStaticProps() {
  return { props: {} }
}

The Amplify UI FaceLivenessDetector is powered by [Amazon Rekognition Face Liveness](https://aws.amazon.com/rekognition/face-liveness/). The FaceLivenessDetector supports two types of verification challenges:

 - The **Face Movement and Light Challenge** consists of a series of head movements and colored light tests.
 - The **Face Movement Challenge** consists only of a series of head movements.

The following screenshots show an example of the Face Movement and Light Challenge in action.

<InlineFilter filters={['android']}>
  <AndroidPage />
</InlineFilter>
<InlineFilter filters={['react']}>
  <ReactPage />
</InlineFilter>
<InlineFilter filters={['swift']}>
  <SwiftPage />
</InlineFilter>

To learn more about spoof attempts deterred by Face Liveness, please see this [demonstration video on YouTube](https://www.youtube.com/watch?v=JfzwVl1wy0s).

## Quick start

<InlineFilter filters={['android']}>
  <PreReqAndroid />
</InlineFilter>
<InlineFilter filters={['react']}>
  <PreReqReact />
</InlineFilter>
<InlineFilter filters={['swift']}>
  <PreReqSwift />
</InlineFilter>

### Step 1. Configure Auth

<InlineFilter filters={['android']}>
  <QuickAndroid />
</InlineFilter>
<InlineFilter filters={['react']}>
  <QuickReact />
</InlineFilter>
<InlineFilter filters={['swift']}>
  <QuickSwift />
</InlineFilter>

> See [Rekognition documentation](https://docs.aws.amazon.com/rekognition/latest/dg/recommendations-liveness.html) for best practices when using `FaceLivenessDetector`.

<InlineFilter filters={['android']}>
  <FullAndroid />
</InlineFilter>
<InlineFilter filters={['react']}>
  <FullReact />
</InlineFilter>
<InlineFilter filters={['swift']}>
  <FullSwift />
</InlineFilter>
